package main

import "fmt"

func main() {
	var phone Phone = Huawei{
		brand: "huawei",
		price: 222.8,
	}

	phone.call()

	phone = new(Xiaomi)
	phone.call()
}

type Phone interface {
	call()
}

type Xiaomi struct {
	brand string
	price float64
}

func (p Xiaomi) call() {
	fmt.Println("I am Xiaomi, I can call you!")
}

type Huawei struct {
	brand string
	price float64
}

func (p Huawei) call() {
	fmt.Println("I am Huawei, I can call you!")
}
